Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Raw • View renderedDownload


README.md linux-daemon (47514771) Text, 6.21 KB

Tc9d1d9# RNode Firmware

This is the firmware for [Tff7b72RNode](Te6edf3https://unsigned.io/rnode), a very flexible LoRa-based communication device. RNode can functions as a:

Tff7b72- A general purpose long-range data radio
Tff7b72- Network adapter for [Tff7b72Reticulum](Te6edf3https://github.com/markqvist/Reticulum)
Tff7b72- LoRa interface for your computer (or any device with a USB or serial port)
Tff7b72- Generic [Tff7b72LoRa-based network adapter](Te6edf3https://unsigned.io/15-kilometre-ssh-link-with-rnode/) for your Linux devices
Tff7b72- [Tff7b72Packet sniffer](Te6edf3https://github.com/markqvist/LoRaMon) for LoRa networks
Tff7b72- LoRa development board
Tff7b72- A LoRa-based KISS-compatible TNC for amateur radio and AX.25 applications
Tff7b72- A flexible platform for experiementing with LoRa technology

To install this firmware on homebrew RNodes and other supported boards, please use the [Tff7b72RNode Config Utility](Te6edf3https://github.com/markqvist/rnodeconfigutil). It contains an auto-installer that allows you to install the RNode firmware on a variety of boards. For guides and tutorials on how to get started with making your own RNodes, visit [Tff7b72unsigned.io](Te6edf3https://unsigned.io).

Tc9d1d9## Current Status
The RNode firmware can be considered stable at this point. If you do find a bug or discover unintended behaviour, please report it as an issue here, so I can fix it!

Tc9d1d9## Supported Hardware

The RNode Firmware supports the following boards:

Tff7b72- The original RNode from [Tff7b72unsigned.io](Te6edf3https://unsigned.io/)
Tff7b72- Homebrew RNodes based on ATmega1284p boards
Tff7b72- Homebrew RNodes based on ATmega2560 boards
Tff7b72- Homebrew RNodes based on Adafruit Feather ESP32 boards
Tff7b72- Homebrew RNodes based on generic ESP32 boards
Tff7b72- LilyGO T-Beam v1.1 devices
Tff7b72- LilyGO LoRa32 v2.0 devices
Tff7b72- LilyGO LoRa32 v2.1 devices

The original RNode from [Tff7b72unsigned.io](Te6edf3https://unsigned.io) is controlled by a powerful ATmega1284p MCU, and is fully Arduino compatible. You can use this firmware, or it can be programmed any way you like, either from the Arduino IDE, or using any of the available tools for AVR development. This firmware can also be edited and compiled directly from the Arduino IDE.

For adding RNode to your Arduino environment, please see [Tff7b72this post](Te6edf3https://unsigned.io/board-support-in-arduino-ide/).

For configuring an RNode with this firmware, please have a look at the [Tff7b72RNode Config Utility](Te6edf3https://github.com/markqvist/rnodeconfigutil).

Tc9d1d9## Operating Modes
RNode can operate in two modes, host-controlled (default) and TNC mode:

Tff7b72- When RNode is in host-controlled mode, it will stay in standby when powered on, until the host specifies frequency, bandwidth, transmit power and other required parameters. This mode can be enabled by using the -N option of this utility. In host-controlled mode, promiscuous mode can be activated to sniff any LoRa frames.

Tff7b72- When RNode is in TNC mode, it will configure itself on powerup and enable the radio immediately. This mode can be enabled by using the -T option of this utility (the utility will guide you through the settings if you don't specify them directly).

Tc9d1d9## USB and Serial Protocol
You can communicate with RNode either via the on-board USB connector, or using the serial pins on the board (labeled RX0 and TX0). RNode uses a standard FTDI USB chip, so it works out of the box without additional drivers in most operating systems.

All communications to and from the board uses [Tff7b72KISS framing](Te6edf3https://en.wikipedia.org/wiki/KISS_(TNC)) with a custom command set. RNode also does not use HDLC ports in the command byte, and as such uses the full 8 bits of the command byte is available for the actual command. Please see table below for supported commands.

| Command | Byte | Description
| -----------------|------| -----------------------------------------------
| Data frame | 0x00 | A data packet to or from the device
| Frequency | 0x01 | Sets or queries the frequency
| Bandwidth | 0x02 | Sets or queries the bandwidth
| TX Power | 0x03 | Sets or queries the TX power
| Spreading Factor | 0x04 | Sets or queries the spreading factor
| Coding Rate | 0x05 | Sets or queries the coding rate
| Radio State | 0x06 | Sets or queries radio state
| Radio Lock | 0x07 | Sets or queries the radio lock
| Device Detect | 0x08 | Probe command for device detection
| Promiscuous | 0x0E | Sets or queries promiscuous mode
| RX Stats | 0x21 | Queries received bytes
| TX Stats | 0x22 | Queries transmitted bytes
| Last RSSI | 0x23 | Indicates RSSI of last packet received
| Blink | 0x30 | Blinks LEDs
| Random | 0x40 | Queries for a random number
| Firmware Version | 0x50 | Queries for installed firmware version
| ROM Read | 0x51 | Read EEPROM byte
| ROM Write | 0x52 | Write EEPROM byte
| TNC Mode | 0x53 | Enables TNC mode
| Normal Mode | 0x54 | Enables host-controlled mode
| ROM Erase | 0x59 | Completely erases EEPROM
| Error | 0x90 | Indicates an error

Tc9d1d9## Programming Libraries
Have a look in the "Libraries" folder for includes to let you easily use RNode in your own software.

Here's a Python example:

Ta5d6ff```Ta5d6ffpython
Tff7b72from T7ee787RNode Tff7b72import Te6edf3RNodeInterface

Tff7b72def Td2a8ffgotPacketTb4b4b4(Te6edf3dataTb4b4b4, Te6edf3rnodeTb4b4b4)Tb4b4b4:
Tffa657print Ta5d6ff"Ta5d6ffReceived a packet: Ta5d6ff"Tff7b72+Te6edf3data

Te6edf3rnode Tff7b72= Te6edf3RNodeInterfaceTb4b4b4(
Te6edf3callback Tff7b72= Te6edf3gotPacketTb4b4b4,
Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffMy RNodeTa5d6ff"Tb4b4b4,
Te6edf3port Tff7b72= Ta5d6ff"Ta5d6ff/dev/ttyUSB0Ta5d6ff"Tb4b4b4,
Te6edf3frequency Tff7b72= T79c0ff868000000Tb4b4b4,
Te6edf3bandwidth Tff7b72= T79c0ff125000Tb4b4b4,
Te6edf3txpower Tff7b72= T79c0ff2Tb4b4b4,
Te6edf3sf Tff7b72= T79c0ff7Tb4b4b4,
Te6edf3cr Tff7b72= T79c0ff5Tb4b4b4,
Te6edf3loglevel Tff7b72= Te6edf3RNodeInterfaceTff7b72.Td2a8ffLOG_DEBUGTb4b4b4)

Te6edf3rnodeTff7b72.Td2a8ffsendTb4b4b4(Ta5d6ff"Ta5d6ffHello World!Ta5d6ff"Tb4b4b4)
Ta5d6ff```

Tc9d1d9## Promiscuous Mode and LoRa Sniffing
RNode can be put into LoRa promiscuous mode, which will dump raw LoRa frames to the host. Raw LoRa frames can also be sent in this mode, and have the standard LoRa payload size of 255 bytes. To enable promiscuous mode send the "Promiscuous" command to the board, or use one of the programming libraries. You can also use the example program [Tff7b72LoRaMon](Te6edf3https://github.com/markqvist/LoRaMon) for an easy to use LoRa packet sniffer.

Tc9d1d9## Support RNode Development
You can help support the continued development of open, free and private communications systems by donating via one of the following channels:

Tff7b72- Ethereum: 0x81F7B979fEa6134bA9FD5c701b3501A2e61E897a
Tff7b72- Bitcoin: 3CPmacGm34qYvR6XWLVEJmi2aNe3PZqUuq
Tff7b72- Ko-Fi: https://ko-fi.com/markqvist


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────